$OpenBSD: patch-CMakeLists_txt,v 1.10 2017/02/13 19:58:00 sthen Exp $

use FindBacktrace.cmake (added in cmake 3)

--- CMakeLists.txt.orig	Mon Feb 13 09:52:45 2017
+++ CMakeLists.txt	Mon Feb 13 16:59:09 2017
@@ -228,15 +228,14 @@ set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DI2_D
 set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DI2_DEBUG")
 
 check_function_exists(vfork HAVE_VFORK)
-check_function_exists(backtrace_symbols HAVE_BACKTRACE_SYMBOLS)
 check_function_exists(pipe2 HAVE_PIPE2)
 check_function_exists(nice HAVE_NICE)
 check_library_exists(dl dladdr "dlfcn.h" HAVE_DLADDR)
-check_library_exists(execinfo backtrace_symbols "" HAVE_LIBEXECINFO)
 check_include_file_cxx(cxxabi.h HAVE_CXXABI_H)
 
-if(HAVE_LIBEXECINFO)
-  set(HAVE_BACKTRACE_SYMBOLS TRUE)
+find_package(Backtrace)
+if(Backtrace_FOUND)
+  include_directories(${Backtrace_INCLUDE_DIRS})
 endif()
 
 if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
